package com.interview.tech.action;

import java.util.List;

import com.interview.tech.services.QuestionService;
import com.opensymphony.xwork2.ActionSupport;

import com.interview.tech.model.Question;

public class ViewQuestions extends ActionSupport {

	private QuestionService questionService;

	private List<Question> questions;

	@Override
	public String execute() throws Exception {

		questions = questionService.getAllQuestions();
		return SUCCESS;
	}

	public QuestionService getQuestionService() {
		return questionService;
	}

	public void setQuestionService(QuestionService questionService) {
		this.questionService = questionService;
	}

	public List<Question> getQuestions() {
		return questions;
	}

	public void setQuestions(List<Question> questions) {
		this.questions = questions;
	}

}
